package com.yanghx.order.server.vo;

import lombok.Data;

/**
 * @author yangHX
 * createTime  2019/9/11 15:11
 */
@Data
public class ResultVO<T> {

    private Integer code;

    private String msg;

    private T data;

    public static <T> ResultVO<T> success(T data) {
        ResultVO<T> resultVO = new ResultVO<>();
        resultVO.setCode(0);
        resultVO.setMsg("成功");
        resultVO.setData(data);
        return resultVO;
    }
}
